import Router from 'vue-router'
import main from '@/module/main/main'
import hoemChildPath from './path'

export default new Router({
  mode: 'hash',
  base: '',
  scrollBehavior(to, from, savedPosition) {
    // 对于所有路由导航，简单地让页面滚动到顶部
    return {x: 0, y: 0}
  },
  routes: [
    {path: '*', redirect: '/task'},
    {path: '/', name: 'main', meta: {title: '首页'}, children: hoemChildPath, component: main},
    {path: '/login', name: 'login', meta: {title: '登录'}, component: resolve => require(['@/module/sys/login'], resolve)}
  ]
})
